﻿import re

# All the pic suffix
ALL_PIC_EXTS = [
            '.gif',
            '.jpg',
            '.jpeg',
        ]

# Except the pic suffix witch we won't download.
NOT_PIC_EXTS = [
        '.gif',
        #'.jpg',
        #'.jpeg',
        ]
        
# Other pic suffix witch we will download
DOWN_PIC_EXTS = list(set(ALL_PIC_EXTS)-set(NOT_PIC_EXTS))

PIC_MIN_SIZE = '100' # kb

DATABASE_NAME = [
                'sj.sqlite',
            ]
            
#PIC_PATH_TOP = 'F:\\pic_download'
PIC_PATH_TOP = '/mnt/sda12/pic_download'

HTML_CODEC = 'utf8'

def get_exclude_pics():
    f = file('exclude_pic_urls.lst', 'r')
    content = f.readlines()
    f.close()
    exclude_urls = []
    for c in content:
        if c.strip() != '':
            exclude_urls.append(c) 
    return exclude_urls
    
EXCLUDE_URL_REGS = [
                r'.*/avatar.php?.*',
]

